############################################
############################################
## This Makefile is in chrge of building  ##
## the test for the format utility.       ##
############################################
############################################
#
# Where CUnit  and FAT header files live
INC = -I /usr/include/CUnit/ -I ../../Src/Include/
# compiler
CC = gcc
# Compiler flags
CFLAGS = -Wall -pedantic -g
# Where the libfat lib lives
LIB_PATH = -L ../../lib/
# Where coverege info lives

.PHONY : test clean

mkdir_test: ../../bin/libfat.a mkdir_suite.o mkdir_test.o 
	$(CC)  $(LIB_PATH) -o mkdir_test $^ -lcunit -lfat 

mkdir_test.o:  mkdir_test.c
	$(CC) $(CFLAGS) $(INC) -c $<

mkdir_suite.o: mkdir_suite.c
	$(CC) $(CFLAGS) $(INC) -c $<

# Target di test
test: mkdir_test	
	./mkdir_test
	@echo -e "\n\n\a *** Test mkdir superato! ***\n"

clean:
	rm -f *.o
	rm -f mkdir_test
	rm -f *~
